using Commons.Models.Settings.Dtos.Questions;
using Commons.Models.Settings.Dtos.Stats;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace Commons.Models.Settings.Dtos
{
	[XmlRoot(ElementName = "config", Namespace = "http://www.ibeltran.com/schema/game")]
	[XmlInclude(typeof(GameConfigDto))]
	public class GameConfigDto
	{
		[XmlAttributeAttribute(AttributeName = "schemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")]
		public string xsiSchemaLocation = "Schemas/game-config.xsd";

		[XmlElement(ElementName = "stats", Namespace = "http://www.ibeltran.com/schema/game/stat")]
		public StatsDto Stats { get; set; }

        [XmlArray(ElementName = "categories", Namespace = "http://www.ibeltran.com/schema/game/questions"), XmlArrayItem(ElementName = "category", Namespace = "http://www.ibeltran.com/schema/game/questions")]
        public List<QuestionCategoryDefinitionDto> Categories;

        [XmlArray(ElementName = "questions", Namespace = "http://www.ibeltran.com/schema/game/questions", IsNullable = false), XmlArrayItem(ElementName = "question", Namespace = "http://www.ibeltran.com/schema/game/questions")]
        public List<QuestionDefinitionDto> Questions;
	}
}

